// Desktop (instantiate JTF COM Wrapper)
var desktop = new ActiveXObject("SilkTestLib.Desktop");

// Base state information
var baseStateData = {};
baseStateData.url = "http://demo.borland.com/InsuranceWebExtJS/";
baseStateData.locator = "/BrowserApplication/BrowserWindow";
baseStateData.techDomains = "xBrowser";
baseStateData.exe = "C:\\Program Files\\Internet Explorer\\iexplore.exe";
//baseStateData.exe = "C:\\Program Files\\Mozilla Firefox\\firefox.exe";

// Execute Base State
function baseState() {
    return desktop.executeBrowserBaseState(baseStateData.exe, baseStateData.url, baseStateData.locator, baseStateData.techDomains);
}

function testCase() {
    var browser = baseState();
    var domListBox = browser.find("//SELECT[@id='quick-link:jump-menu']");
    domListBox.select("Auto Quote");
    browser.find("//INPUT[@id='autoquote:zipcode']").setText("4040");
    browser.find("//INPUT[@id='autoquote:e-mail']").setText("john.smith@gmail.com");
    browser.find("//INPUT[@id='autoquote:vehicle:0']").select();
    browser.find("//INPUT[@id='autoquote:next']").select();
    browser.find("//INPUT[@id='autoquote:age']").setText("32");
    browser.find("//INPUT[@id='autoquote:gender:0']").select();
    browser.find("//INPUT[@id='autoquote:type:0']").select();
    browser.find("//INPUT[@id='autoquote:next']").select();
    browser.find("//INPUT[@id='autoquote:year']").setText("2009");
    browser.find("//DIV[@id='carMakesDIV']").find("//IMG[@src='http://extjs.com/s.gif']").domClick();
    browser.find("//DIV[@textContents='Lexus']").domClick();
    browser.find("//DIV[@id='carModelsDIV']").find("//IMG[@src='http://extjs.com/s.gif']").domClick();
    browser.find("//DIV[@textContents='LS600h']").domClick();
    browser.find("//INPUT[@id='autoquote:finInfo:0']").select();
    browser.find("//INPUT[@id='autoquote:next']").select();
}

testCase();